<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ page import="java.math.BigDecimal" %>
<%@ page import="org.springframework.context.ApplicationContext"%>
<%@ page import="org.springframework.context.support.ClassPathXmlApplicationContext"%>
<%@ page import="com.gopay.common.Result"%>
<%@ page import="com.gopay.common.domain.bank.BaseMessage"%>
<%@ page import="com.gopay.remote.bank.WapPayInteractRemoteService"%>
<%@ page import="com.gopay.common.constants.bank.BisBankInterfaceChannel" %>
<%@ page import="com.gopay.common.constants.bank.BisBankBusinessProd" %>

<% 
	try{
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
		WapPayInteractRemoteService bankInteractService = (WapPayInteractRemoteService) context.getBean("wapPayService");
		BaseMessage base = new BaseMessage();
       // base.setOrderId("2013052903283782");
        base.setOrderId("2030000000034060");
        base.setAmount(new BigDecimal("0.01"));
		base.setBankIntrChann(BisBankInterfaceChannel._00);
		base.setBankBusProd(BisBankBusinessProd._00);

//        base.setBank("HXBC");
		base.setBank("CCB");
		Result result = (Result) bankInteractService.pay(base);
	    out.println("<h2>ok!!!<h2>");
		out.println(result.toString());
	}catch(Exception e){
			out.println(e); 
	}
%>